package com.rd.student.jiaji.class4.suyan.zrrd.day03;
/*
算数运算符
*/
public class Demo01 {
    public static void main(String[] args) {
        //使用整数进行运算符操作（整数使用运算符，无论任何运算，得到的结果都是整数）
        int i=7;
        int i1=3;
        int result;
        result =i+i1;
        System.out.println(result);
        result =i-i1;
        System.out.println(result);
        result =i*i1;
        System.out.println(result);
        result =i/i1;
        System.out.println(result);
        result =i%i1;
        System.out.println(result);
        System.out.println("------------------");
        result =i++;//后++
        System.out.println(result);//7
        System.out.println(i);//8
        i=7;//将变量i的值重新赋值为7
        result=++i;//前++运算
        System.out.println(result);//8
        System.out.println(i);//8
        i=7;
        result=i++ + ++i + i++ + ++i + i;
        System.out.println(result);
        System.out.println(i);
        //+符号在字符串中的操作
        System.out.println("5+5="+5+5);
        //5+5=5+5-->5+5=55
    }


    }

